A shop class CNC router project needs only a short list of G and M codes. Here are the codes students use, a simple project walkthrough, and how to learn them fast.
A CNC router cutting air almost always means the Z zero, the work origin, or the units are wrong. Here is how to diagnose each cause and fix it before you waste stock.
Most VCarve G-code problems are post processor mismatches: the wrong .pp file for your controller. The symptom table and the air-cut habit that ends them.